<template>
    <view>
        <!-- 列表 -->
        <view class="listBox">
            <!-- 新订单 -->
            <news :item="item" v-if="type == 'new'" />
            <!-- 进行中 -->
            <progress :item="item" v-if="type == 'progress'" />
            <!-- 已完成 -->
            <Completed :item="item" v-if="type == 'completed'" />
        </view>
    </view>
</template>
<script>
import News from './new_order.vue'; //新订单
import progress from './progress_order.vue'; //进行中
import Completed from './Completed_order.vue'; //已完成
export default {
    name: 'order-item-lock',
    props: {
        item: {
            type: Object,
            default: () => {}
        },
        type: {
            type: String,
            default: ''
        }
    },
    data() {
        return {};
    },
    components: {
        News,
        Completed,
        progress
    },
    methods: {
        click1(e) {
            console.log('click1', e);
            this.tabactive = e;
            if (e == 0) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/DeliverymanOrder/DeliverymanOrder'
                });
            }
            if (e == 1) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/me'
                });
            }
        },
        OrderCompletion(type) {
            uni.navigateTo({
                url: '/pages/OrderReceiverTerminal/UnlockOrder/OrderCompletion?type=' + type
            });
        },
        InAppeal() {
            uni.navigateTo({
                url: '/pages/OrderReceiverTerminal/UnlockOrder/appeal'
            });
        },
        InAppealinfo() {
            uni.navigateTo({
                url: '/pages/OrderReceiverTerminal/UnlockOrder/InAppeal'
            });
        },
        tip(e) {
            this.tipIndex = e;
            if (this.tipIndex == 1) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/TrailerOrder/TrailerOrder'
                });
            }
            if (this.tipIndex == 2) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/DeliverymanOrder/DeliverymanOrder'
                });
            }
            if (this.tipIndex == 3) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/BatteryOrdering/BatteryOrdering'
                });
            }
            if (this.tipIndex == 4) {
                uni.navigateTo({
                    url: '/pages/OrderReceiverTerminal/UnlockOrder/UnlockOrder'
                });
            }
        },
        navtab(e) {
            this.tabIndex = e;
        },
        click(item) {
            console.log('item', item);
        },
        buybtn(id) {
            uni.navigateTo({
                url: '/pages/me/MyOrder/ServiceOrders?type=' + id
            });
        },
        evaluate() {
            uni.navigateTo({
                url: '/pages/me/MyOrder/evaluate'
            });
        },
        AfterSalesDetails() {
            uni.navigateTo({
                url: '/pages/me/MyOrder/AfterSalesDetails'
            });
        },
        inProgress() {
            uni.navigateTo({
                url: '/pages/me/MyOrder/inProgress'
            });
        },
        OrderDetailsReceiver(type) {
            uni.navigateTo({
                url: '/pages/OrderReceiverTerminal/UnlockOrder/UnlockOrderDetails?type=' + type
            });
        }
    }
};
</script>

<style scoped lang="scss">
.delete {
    width: 160rpx;
    height: 68rpx;
    line-height: 68rpx;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    border: 2rpx solid #ccced1;
    text-align: center;
    color: #666b75;
    margin-top: 36rpx;
}
.search {
    width: 35rpx;
    height: 35rpx;
    margin-top: 20rpx;
    margin-left: 28rpx;
}
.active {
    color: #3377ff;
}
.bottonTab {
    height: 100rpx;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding-bottom: 20rpx;
    padding-top: 20rpx;
}
.tabitem {
    width: 50%;
    margin: 0 auto;
    display: inline-block;
    text-align: center;
    font-size: 28rpx;
    color: #ccced1;
}
.tabIcon {
    width: 40rpx;
    height: 40rpx;
    display: block;
    margin: 0 auto;
}
.addBtn {
    width: 638rpx;
    height: 100rpx;
    line-height: 100rpx;
    text-align: center;
    background: #3377ff;
    border-radius: 16rpx;
    margin-top: 24rpx;
    color: white;
}
.icon_dh {
    width: 28rpx;
    height: 28rpx;
    margin-right: 12rpx;
}
.titleTip {
    width: 40rpx;
    height: 40rpx;
    background: #ff6401;
    color: white;
    border-radius: 8rpx;
    font-size: 24rpx;
    text-align: center;
}
.phoneBtn {
    width: 230rpx;
    height: 100rpx;
    line-height: 100rpx;
    background: #f7f7f7;
    border-radius: 16rpx;
    margin-top: 24rpx;
    margin-right: 24rpx;
    vertical-align: middle;
    text-align: center;
    display: inline-block;
}
.addBtn1 {
    width: 384rpx;
    height: 100rpx;
    line-height: 100rpx;
    text-align: center;
    background: #3377ff;
    border-radius: 16rpx;
    margin-top: 24rpx;
    color: white;
}
.smaz {
    width: 112rpx;
    height: 48rpx;
    background: #3377ff;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    color: white;
    font-size: 28rpx;
    text-align: center;
    padding: 8rpx;
    margin-left: 24rpx;
}
.box {
    padding: 0 32rpx;
}
.tipbox {
    background: #f7f7f7;
    border-radius: 8rpx;
    color: #666b75;
    font-size: 28rpx;
    padding: 8rpx;
}
.tip {
    padding: 16rpx;
    border-radius: 8rpx;
}
.tipActive {
    background: white;
    color: #00091a;
    padding: 16rpx;
    border-radius: 8rpx;
}
.tab {
    color: #999ca3;
    font-size: 28rpx;
    margin: 19rpx;
}
.tabActive {
    color: #3377ff;
    font-size: 32rpx;
    margin: 19rpx;
    font-weight: bold;
}
.list {
    padding: 24rpx;
    border-radius: 24rpx;
    margin-top: 24rpx;
    .round {
        width: 40rpx;
        height: 40rpx;
        border-radius: 16rpx;
        background: #00091a;
        font-size: 28rpx;
        color: white;
        text-align: center;
        line-height: 40rpx;
    }
    .type {
        color: #3377ff;
        font-weight: bold;
    }
    .time {
        color: #ccced1;
    }
    .title {
        width: 90%;
        color: #00091a;
        font-size: 32rpx;
        font-weight: bold;
    }
    .address {
        display: inline-block;
        white-space: nowrap;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .name {
        font-weight: normal;
        color: #333a47;
        margin-right: 24rpx;
    }
    .iphone {
        font-weight: normal;
        color: #999ca3;
    }
    .money {
        text-align: right;
        color: #666b75;
    }
    .money text {
        color: #ff6401;
        font-weight: bold;
        font-size: 32rpx;
    }
    .btn {
        text-align: right;
    }
    .cance {
        width: 160rpx;
        height: 68rpx;
        line-height: 68rpx;
        border-radius: 8rpx;
        color: #666b75;
        text-align: center;
        border: 2rpx solid #ccced1;
        margin-top: 24rpx;
    }
    .buy {
        width: 160rpx;
        height: 68rpx;
        line-height: 68rpx;
        border-radius: 8rpx;
        color: #ffffff;
        text-align: center;
        background: #3377ff;
        margin-left: 24rpx;
        margin-top: 24rpx;
    }
}
</style>
